package cn.etynit.mms.feign;

import cn.etynit.domain.ExpenseCar;
import cn.etynit.mms.fallback.ExpenseCarServiceFallbackFactory;
import cn.etynit.result.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(contextId = "expenseCarService",value = "service-expense",path = "/expenseCar",fallbackFactory = ExpenseCarServiceFallbackFactory.class)
public interface ExpenseCarService {
    @RequestMapping(value="/save",method= RequestMethod.POST)
    JsonResult saveOrUpdate(@RequestBody ExpenseCar expenseCar);

    @RequestMapping(value = "/list",method = RequestMethod.GET)
    JsonResult list();

    @RequestMapping(value = "/surplusParkingSpace/{type}",method = RequestMethod.GET)
    JsonResult surplusParkingSpace(@PathVariable("type")Integer type);

    @RequestMapping(value = "/selectByUserId/{id}",method = RequestMethod.GET)
    JsonResult selectByUserId(@PathVariable("id")Long id);
}
